/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       soundloader.h
 * Author:     karooolek
 * Created on: 2009-07-15
 *
 **********************************************************************************************************************/

#ifndef SOUNDLOADER_H_
#define SOUNDLOADER_H_

#include "soundfactory.h"
#include "../common.h"

namespace mGameEngine
{
namespace Audio
{

/**
 * Sound file loader.
 * Loads sounds from all supported file formats.
 * Provides static methods for quick and easy file loading.
 */
class SoundLoader: public SoundFactory, public FileLoader
{
public:
    /**
     * Load sound from specified file.
     * @param filename sound file name to load.
     * @return loaded sound.
     */
    static Sound *loadSoundFromFile(const String &filename);

    /**
     * Create sound loader with no file name specified.
     */
    SoundLoader();

    /**
     * Create sound file loader with specified file name.
     * @param filename sound file name to load.
     */
    SoundLoader(const String &filename);

    /**
     * Destroy sound file loader.
     */
    virtual ~SoundLoader();

    /**
     * Load sound from file.
     */
    virtual void load();

    /**
     * Unload sound.
     */
    virtual void unload();
};

}
}

#endif // SOUNDLOADER_H_
